package day01;

/**
 * Created by Administrator on 2023/6/29 0029.
 */
//输入n计算1~n 全部连接起来的长度(n分别取100,100000,100000000,100000000000000)
//Ctrl + Alt +L

public class Demo {
    public static void main(String[] args) {
        String s = "";
        int n = 1000000;
        for (int i = 1; i <= n; i++) {
            s = s + i;
        }
        System.out.println(s.length());
    }
}
